package com.yicong.ants.bean.coin;

/**
 * 验证转赠记录
 */
public class DelayTransferRecord {
    String id;//记录id
    String form_uid;//卖家(自己的uid)
    String to_uid;//买家（别人的uid）
    String amount;//转账数量
    String type;//类型：10=门票转赠，20=仓库转赠
    int status;//0=普通转赠已到账，10=延迟转赠中，20=延迟转赠立即到账，30=延迟转赠申述中，40=申诉已退还转出方，50=申述已转入收款方
    String tax;//手续费
    String create_time;//创建时间
    String update_time;//更新时间
    String get_time;//预计到账时间，status=10有此字段
    String status_text;//状态text
    String target_text;

    public DelayTransferRecord() {
    }

    //0=from_uid 自己转给别人；1=to_uid 别人转给自己
    public String getTargetText(String target) {
        StringBuilder uid = new StringBuilder("");

        if ("0".equals(target)) {
            uid.append("转赠好友");
        } else if ("1".equals(target)) {
            uid.append("收到转赠");
        }

        uid.append(' ')
                .append(to_uid)
                .append(' ');

        if ("10".equals(type)) {
            uid.append("余额");
            return uid.toString();
        } else if ("20".equals(type)) {
            uid.append("仓库");
            return uid.toString();
        }
        return uid.toString();
    }

    public String getId() {
        return this.id;
    }

    public String getForm_uid() {
        return this.form_uid;
    }

    public String getTo_uid() {
        return this.to_uid;
    }

    public String getAmount() {
        return this.amount;
    }

    public String getType() {
        return this.type;
    }

    public int getStatus() {
        return this.status;
    }

    public String getTax() {
        return this.tax;
    }

    public String getCreate_time() {
        return this.create_time;
    }

    public String getUpdate_time() {
        return this.update_time;
    }

    public String getGet_time() {
        return this.get_time;
    }

    public String getStatus_text() {
        return this.status_text;
    }

    public String getTarget_text() {
        return this.target_text;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setForm_uid(String form_uid) {
        this.form_uid = form_uid;
    }

    public void setTo_uid(String to_uid) {
        this.to_uid = to_uid;
    }

    public void setAmount(String amount) {
        this.amount = amount;
    }

    public void setType(String type) {
        this.type = type;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public void setTax(String tax) {
        this.tax = tax;
    }

    public void setCreate_time(String create_time) {
        this.create_time = create_time;
    }

    public void setUpdate_time(String update_time) {
        this.update_time = update_time;
    }

    public void setGet_time(String get_time) {
        this.get_time = get_time;
    }

    public void setStatus_text(String status_text) {
        this.status_text = status_text;
    }

    public void setTarget_text(String target_text) {
        this.target_text = target_text;
    }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof DelayTransferRecord)) return false;
        final DelayTransferRecord other = (DelayTransferRecord) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$id = this.getId();
        final Object other$id = other.getId();
        if (this$id == null ? other$id != null : !this$id.equals(other$id)) return false;
        final Object this$form_uid = this.getForm_uid();
        final Object other$form_uid = other.getForm_uid();
        if (this$form_uid == null ? other$form_uid != null : !this$form_uid.equals(other$form_uid))
            return false;
        final Object this$to_uid = this.getTo_uid();
        final Object other$to_uid = other.getTo_uid();
        if (this$to_uid == null ? other$to_uid != null : !this$to_uid.equals(other$to_uid))
            return false;
        final Object this$amount = this.getAmount();
        final Object other$amount = other.getAmount();
        if (this$amount == null ? other$amount != null : !this$amount.equals(other$amount))
            return false;
        final Object this$type = this.getType();
        final Object other$type = other.getType();
        if (this$type == null ? other$type != null : !this$type.equals(other$type)) return false;
        if (this.getStatus() != other.getStatus()) return false;
        final Object this$tax = this.getTax();
        final Object other$tax = other.getTax();
        if (this$tax == null ? other$tax != null : !this$tax.equals(other$tax)) return false;
        final Object this$create_time = this.getCreate_time();
        final Object other$create_time = other.getCreate_time();
        if (this$create_time == null ? other$create_time != null : !this$create_time.equals(other$create_time))
            return false;
        final Object this$update_time = this.getUpdate_time();
        final Object other$update_time = other.getUpdate_time();
        if (this$update_time == null ? other$update_time != null : !this$update_time.equals(other$update_time))
            return false;
        final Object this$get_time = this.getGet_time();
        final Object other$get_time = other.getGet_time();
        if (this$get_time == null ? other$get_time != null : !this$get_time.equals(other$get_time))
            return false;
        final Object this$status_text = this.getStatus_text();
        final Object other$status_text = other.getStatus_text();
        if (this$status_text == null ? other$status_text != null : !this$status_text.equals(other$status_text))
            return false;
        final Object this$target_text = this.getTarget_text();
        final Object other$target_text = other.getTarget_text();
        if (this$target_text == null ? other$target_text != null : !this$target_text.equals(other$target_text))
            return false;
        return true;
    }

    protected boolean canEqual(final Object other) {
        return other instanceof DelayTransferRecord;
    }

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $id = this.getId();
        result = result * PRIME + ($id == null ? 43 : $id.hashCode());
        final Object $form_uid = this.getForm_uid();
        result = result * PRIME + ($form_uid == null ? 43 : $form_uid.hashCode());
        final Object $to_uid = this.getTo_uid();
        result = result * PRIME + ($to_uid == null ? 43 : $to_uid.hashCode());
        final Object $amount = this.getAmount();
        result = result * PRIME + ($amount == null ? 43 : $amount.hashCode());
        final Object $type = this.getType();
        result = result * PRIME + ($type == null ? 43 : $type.hashCode());
        result = result * PRIME + this.getStatus();
        final Object $tax = this.getTax();
        result = result * PRIME + ($tax == null ? 43 : $tax.hashCode());
        final Object $create_time = this.getCreate_time();
        result = result * PRIME + ($create_time == null ? 43 : $create_time.hashCode());
        final Object $update_time = this.getUpdate_time();
        result = result * PRIME + ($update_time == null ? 43 : $update_time.hashCode());
        final Object $get_time = this.getGet_time();
        result = result * PRIME + ($get_time == null ? 43 : $get_time.hashCode());
        final Object $status_text = this.getStatus_text();
        result = result * PRIME + ($status_text == null ? 43 : $status_text.hashCode());
        final Object $target_text = this.getTarget_text();
        result = result * PRIME + ($target_text == null ? 43 : $target_text.hashCode());
        return result;
    }

    public String toString() {
        return "DelayTransferRecord(id=" + this.getId() + ", form_uid=" + this.getForm_uid() + ", to_uid=" + this.getTo_uid() + ", amount=" + this.getAmount() + ", type=" + this.getType() + ", status=" + this.getStatus() + ", tax=" + this.getTax() + ", create_time=" + this.getCreate_time() + ", update_time=" + this.getUpdate_time() + ", get_time=" + this.getGet_time() + ", status_text=" + this.getStatus_text() + ", target_text=" + this.getTarget_text() + ")";
    }
}
